import { Cloud } from 'laf-client-sdk'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
const cloud = new Cloud({
  baseUrl: 'https://su75ks.laf.run', // <APP_ID> 在首页应用列表获取
  getAccessToken: () => userStore.token, // 这里不需要授权，先填空
})

export async function getBranchInfo(email) {
  const res = await cloud.invoke('curd_op', {
    collection: 'Account_Inf',
    operation: 'get',
    data: {
      where: {
        email: email,
      },
    },
  })
  return res
}
